package com.ghck.server.model.query;

import java.util.List;

/**
 * 医院  <br>
 * dict_hospital <br>
 * v1.0 2016-05-01
 */
public class HospitalDictQuery extends Paging {

	private static final long serialVersionUID = 1L;

	private Integer inUsed = 1;

	private Integer levelId;

	private Integer regionId;
	
	private List<Integer> regionIds;

	private String keyword;



	public Integer getInUsed() {
		return inUsed;
	}



	public void setInUsed(Integer inUsed) {
		this.inUsed = inUsed;
	}



	public Integer getLevelId() {
		return levelId;
	}



	public void setLevelId(Integer levelId) {
		this.levelId = levelId;
	}



	public Integer getRegionId() {
		return regionId;
	}



	public void setRegionId(Integer regionId) {
		this.regionId = regionId;
	}


	


	public String getKeyword() {
		return keyword;
	}



	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	


	public List<Integer> getRegionIds() {
		return regionIds;
	}



	public void setRegionIds(List<Integer> regionIds) {
		this.regionIds = regionIds;
	}



	@Override
	public void dealWith() {
		super.dealWith();
		
		if(this.keyword!=null && this.keyword.trim().length()>0){
			if(!keyword.startsWith("%")){
				this.keyword = "%"+this.keyword;
			}
			if(!keyword.endsWith("%")){
				this.keyword = this.keyword+"%";
			}
		}else{
			this.keyword = null;
		}
		
	}

}	